package LinkList;

public class Test {
    public static void main(String[] args) {
        MySingleList list=new MySingleList();
        list.addLast(1);
        list.addLast(1);
        list.addLast(1);
        list.addLast(7);
        list.addLast(4);
        list.addIndex(2,3);
        list.display();
        list.removeAllKey(1);
        list.display();
        list.reverseList();
        System.out.println("获取节点k的链表");
        list.display();
        //System.out.println(list.middleNode().val);
        System.out.println("获取节点k值");
        System.out.println(list.getK(1).val);

        MySingleList list2=new MySingleList();
        list2.addLast(1);
        list2.addLast(4);
        list2.addLast(4);
        list2.addLast(3);
        list2.addLast(12);
        list2.display();
        list2.partition(5);
        list2.display();



    }
}
